ia.MapController Class
Used to control chart navigation.
Constructor
Item Index
Methods
Properties
Methods
centerOnCoords
-
px -
py
Centers the view on a pair of coordinates.
Parameters:
-
pxNumberThe x-coord (data units).
-
pyNumberThe y-coord (data units).
centerOnCursor
()
Centers the view on the cursor position.
changeBBox
-
dXMin -
dYMin -
dXMax -
dYMax
Changes the bounding box using the given distances.
Parameters:
-
dXMinNumberThe change in the xMin (data units).
-
dYMinNumberThe change in the yMin (data units).
-
dXMaxNumberThe change in the xMax (data units).
-
dYMaxNumberThe change in the yMax (data units).
pan
-
direction -
ratio
Pans the given direction and distance.
Parameters:
-
directionNumberThe direction in degrees. Valid values are >=0 and <=360.
-
ratioNumberTo calculate the distance moved,
ratiois multiplied by thebBoxwidth or height (depending on the direction of the pan).The
bBoxis then shifted by the calculated distance.Valid values are > 0.
panDistance
-
direction -
distance
Pans the given direction and distance.
Parameters:
-
directionNumberThe direction in degrees. Valid values are >=0 and <=360.
-
distanceNumberThe distance (data units).
panE
()
Pans East.
panN
()
Pans North.
panNE
()
Pans North-East.
panNW
()
Pans North-West.
panS
()
Pans South.
panSE
()
Pans South-East.
panSW
()
Pans South-West.
panW
()
Pans West.
resetBBox
-
bx -
by -
bw -
bh
Zooms to a bounding box as defined by the following parameters. This is a utility function so that bounding boxes can be dealt with in terms of their x, y, width and height;
Parameters:
-
bxNumberThe x position of the bBox.
-
byNumberThe y position of the bBox.
-
bwNumberThe width of the bBox.
-
bhNumberThe height of the bBox.
translate
-
dx -
dy
Moves the view by the given distance.
Parameters:
-
dxNumberThe distance in the x direction (data units).
-
dyNumberThe distance in the y direction (data units).
zoomFull
()
Zooms to full extents as defined by the default bBox.
zoomIn
()
Zooms in around the center of the view.
zoomInOnCursor
()
Zooms in around the cursor position.
zoomOnCenter
-
ratio
Zooms around the center of the view.
Parameters:
-
ratioNumberTo calculate the distance zoomed, the
bBoxwidth and height are multiplied by theratio.Valid values are > 0.
Values > 1 will cause the view to zoom out. values < 1 will cause the view to zoom in.
zoomOnCoords
-
px -
py -
ratio
Zooms in around a pair of coordinates.
Parameters:
-
pxNumberThe x-coord (data units).
-
pyNumberThe y-coord (data units).
-
ratioNumberTo calculate the distance zoomed, the
bBoxwidth and height are multiplied by theratio.Valid values are > 0.
Values > 1 will cause the view to zoom out. values < 1 will cause the view to zoom in.
zoomOnCursor
-
ratio
Zooms around the cursor position by the given ratio.
Parameters:
-
ratioNumberTo calculate the distance zoomed, the
bBoxwidth and height are multiplied by theratio.Valid values are > 0.
Values > 1 will cause the view to zoom out. values < 1 will cause the view to zoom in.
zoomOnPoint
-
px -
ratio
Zooms in around a point.
Parameters:
-
pxia.PointThe point (data units).
-
ratioNumberTo calculate the distance zoomed, the
bBoxwidth and height are multiplied by theratio.Valid values are > 0.
Values > 1 will cause the view to zoom out. values < 1 will cause the view to zoom in.
zoomOut
()
Zooms out around the center of the view.
zoomOutOnCursor
()
Zooms out around the cursor position.
zoomToExtent
-
extent
Zooms to an extent around the center of the view.
Parameters:
-
extentObjectThe extent to zoom to (data units).
zoomToPointExtent
-
p1 -
p2
Zooms to an extent as defined by two points.
zoomToRect
-
rect
Zooms to a rectangle if the rectangle is greater than 5*5 pixels.
Parameters:
-
rectia.RectangleThe rect (pixel units).